package com.gin.kotlin.no_gay_alliance.argument

import android.os.Parcelable
import com.gin.kotlin.no_gay_alliance.model.AttachmentModel
import com.gin.nga.response.post.PrepareBody
import kotlinx.parcelize.Parcelize

/**
 * 已上传附件参数
 * @property topicId 主题ID
 * @property replyId 回复ID
 * @property attachments 已上传附件
 * @constructor
 */
@Parcelize
data class AttachmentArgument(
    var topicId: Long? = null,
    var replyId: Long? = null,
    var attachments: List<AttachmentModel>? = null,
) : Parcelable {

    constructor(prepareBody: PrepareBody) : this(
        topicId = prepareBody.topicId,
        replyId = prepareBody.replyId,
        attachments = prepareBody.attachments?.map { AttachmentModel(it) }
    )
}
